// 配置服务器相关信息
let express = require('express')
let app = express()
let cors = require('cors')
let bodyParser = require('body-parser')
let bulid_router = require('./router/bulid_router')
let dorm_router = require('./router/dorm_router')
let service_router = require('./router/service_router')



app.use(bodyParser.json()); //配置解析，用于解析json和urlencoded格式的数据
app.use(bodyParser.urlencoded({
    extended: false
}));
app.use(cors()) //配置跨域
app.use(bulid_router) //配置楼宇路由
app.use(dorm_router) //配置宿舍路由
app.use(service_router) //配置维修页面路由


app.listen(80, () => {
    console.log('服务器启动成功');
})
module.exports;